#pragma once

#include <fstream>

#include "MacroDefs.h"

enum SND_FILETYPE
{
	SNDFT_NULL,
	SNDFT_WAV,
	SNDFT_OGG
};

namespace Helper
{
	typedef struct tagWAVDATA
	{
		short	Channels;
		short	BitsPerSample;
		int		SampleRate;
		int		DataSize;
		char*	Data;

		tagWAVDATA()
		{
			this->Channels			= 0;
			this->BitsPerSample		= 0;
			this->SampleRate		= 0;
			this->DataSize			= 0;
			this->Data				= NULL;
		}

		tagWAVDATA(short _channels, short _bps, int _smpRate, int _size, char* _dataptr)
		{
			this->Channels			= _channels;
			this->BitsPerSample		= _bps;
			this->SampleRate		= _smpRate;
			this->DataSize			= _size;
			this->Data				= _dataptr;
		}

		~tagWAVDATA()
		{
			SAFE_DELETE_ARRAY(this->Data);
		}
	} WAVDATA, *PTRWAVDATA;


	void LoadWAVFile(const char *_file, PTRWAVDATA _dataHolder);
}